#ifndef QAPTTEST_H
#define QAPTTEST_H

#include <QMainWindow>

#include <QApt/Globals>

class QLabel;
class QPushButton;
class QLineEdit;
class QStackedWidget;

namespace QApt {
class Backend;
class Package;
class Transaction;
class DownloadProgress;
}

namespace DebconfKde {
class DebconfGui;
}

class CacheUpdateWidget;
class CommitWidget;

namespace Ui {
class QAptTest;
}

class QAptTest : public QMainWindow
{
    Q_OBJECT

public:
    explicit QAptTest(QWidget *parent = nullptr);
    ~QAptTest();

protected:
    void changeEvent(QEvent *e);

private Q_SLOTS:
    void updateLabels();
    void updateCache();
    void commitAction();
    void upgrade();
    void onTransactionStatusChanged(QApt::TransactionStatus status);
    void updateStatusBar();

private:
    Ui::QAptTest *ui;

    QStackedWidget *m_stack;
    QWidget *m_mainWidget;
    QLineEdit *m_lineEdit;
    QPushButton *m_actionButton;
    QLabel *m_nameLabel;
    QLabel *m_sectionLabel;
    QLabel *m_originLabel;
    QLabel *m_installedSizeLabel;
    QLabel *m_maintainerLabel;
    QLabel *m_sourceLabel;
    QLabel *m_versionLabel;
    QLabel *m_packageSizeLabel;
    QLabel *m_shortDescriptionLabel;
    QLabel *m_longDescriptionLabel;

    QLabel *m_changedPackagesLabel;
    QLabel *m_packageCountLabel;

    CacheUpdateWidget *m_cacheUpdateWidget;
    CommitWidget *m_commitWidget;

    QApt::Backend *m_backend;
    QApt::Package *m_package;
    QApt::Group *m_group;
    QApt::Transaction *m_trans;

    DebconfKde::DebconfGui *m_debconfGui;
};

#endif // QAPTTEST_H
